<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<link rel="stylesheet" href="css/style.css">
<title>2048</title>
</head>
<body>
  <div id="chooseMode" class="chooseMode">
     <div class="contentBox">
        <div class="title">2048Game</div>
        <div class="twoMode">
          <a href="javascript:;" class="fourGrids" onclick="twoMode('4')">4x4格</a>
          <a href="javascript:;" class="sixGrids"  onclick="twoMode('6')">6x6格</a>
        </div>
     </div>
  </div>
</body>
<script type="text/javascript">
(function(){
  var windowHeight= window.innerHeight,
   box = document.getElementById("chooseMode");
   box.style.height = windowHeight + 'px';
   box.style.lineHeight = windowHeight + 'px';
  
})();
function twoMode( num ){
  window.sessionStorage.setItem("game2048Grids",num);
  setTimeout(function(){window.location.href="2048game_test/2048.htm"},200);
}
</script>
</html>
